package Object.enumTest;

import java.lang.reflect.Array;
import java.util.Arrays;

/**
 * @author haomin
 * @date 2022/11/12 11:28
 **/
public enum Enum {
    Red, Blue, Pink;
}

class EnumTest{
    public static void main(String[] args) {
        Enum[] values = Enum.values();
        System.out.println(Arrays.toString(values));

        //拿到枚举实例BLACK
        Enum e1 = Enum.Blue;
        //拿到枚举实例RED
        Enum e2 = Enum.Red;
        System.out.println(e1.compareTo(e2));
    }
}